
IF OBJECT_ID('dbo.GetContractManagers') IS NOT NULL
BEGIN
    DROP PROCEDURE dbo.GetContractManagers
    IF OBJECT_ID('dbo.GetContractManagers') IS NOT NULL
        PRINT '<<< FAILED DROPPING PROCEDURE dbo.GetContractManagers >>>'
    ELSE
        PRINT '<<< DROPPED PROCEDURE dbo.GetContractManagers >>>'
END
go
-- =======================================================================
-- Procedure Name: dbo.GetContractManagers
--
-- Author:      Ponraja Chandran
--
-- Create date: 12/15/2009
--
-- Description: Returns list of Contract Managers from Insight
--
-- Parameters:  None
--              
-- Returns:     INT, 0=Success, -1=Error
--
-- SampleCall:
-- EXECUTE dbo.GetContractManagers()
--
--------------------------------------------------------------------------
-- Date        Initials  Modification
--------------------------------------------------------------------------
-- 12/15/2009     CP        Created
-- =======================================================================
CREATE PROCEDURE dbo.GetContractManagers
AS
BEGIN
    
  -- Declare Local Variables
     DECLARE   @Error            INT,
               @RowCount         INT

	SELECT DISTINCT 
		ContractSpecialistID,
		ContractSpecialist               
	FROM
	    InfoEdUDFProposal
	WHERE ContractSpecialist is not null
     

     SELECT @Error=@@ERROR,@RowCount=@@ROWCOUNT
     IF @Error!=0
          RETURN -1

     -- Return Success
     RETURN 0
     
END
go

IF OBJECT_ID('dbo.GetContractManagers') IS NOT NULL
    PRINT '<<< CREATED PROCEDURE dbo.GetContractManagers >>>'
ELSE
    PRINT '<<< FAILED CREATING PROCEDURE dbo.GetContractManagers >>>'
go

GRANT EXECUTE ON dbo.GetContractManagers TO InsightReport,Insight
go

